const request = require('../utils/request');

/**
 * 会员登录
 * @param {object} params {mobile, password, code}
 * @returns Promise
 */
function login(params) {
  return request.post('/member/login', params);
}

/**
 * 修改密码
 * @param {object} params {oldPassword, newPassword}
 * @returns Promise
 */
function updatePassword(params) {
  return request.put('/member/updatePassword', params);
}

function info(){
  return request.get('/member/info');
}

module.exports = {
  login,
  updatePassword,
  info
}; 